export default {
    namespaced: true,
    state: {
    //   token: '123'
    // 存入发请求的token 保存token到vuex
    token: uni.getStorageSync('token') || ''
    },
    mutations: {
      // 更新token的mutation
      setToken(state, payload) {
        console.log('这个是模块里面的mutation');
        state.token = payload
        // 本地持久化 保存token到vuex
        uni.setStorageSync('token', payload)
      }
    }
  }